package day04;
import java.util.Scanner;
public class Day04HomeWork01 {
    public static void main(String[] args) {
        Scanner scan1=new Scanner(System.in);

        System.out.println("第一题");
        System.out.println("人工服务请按1，充值缴费请按2，重新播放请按3，返回请按4");
        int num1=scan1.nextInt();
        switch (num1) {
            case 1:
                System.out.println("正在为您转接人工服务...");
                break;
            case 2:
                System.out.println("请稍后...");
                break;
            case 3:
                System.out.println("正在为您重新播放...");
                break;
            case 4:
                System.out.println("正在返回中...");
                break;
            default:
                System.out.println("输入错误,请核对后输入");
        }

        System.out.println("第二题");
        Scanner scan2=new Scanner(System.in);
        int answer1=(int)(Math.random()*1000+1);
        System.out.println("请输入您猜的值");
        int guess1=scan2.nextInt();
        while (guess1!=answer1){
           if(guess1<answer1){
               System.out.println("猜小了");
           }else if(guess1>answer1){
               System.out.println("猜大了");
            }
            System.out.println("请重新输入");
            guess1=scan2.nextInt();
        }
        System.out.println("恭喜你，答对了!");

        System.out.println("第三题");
        Scanner scan3=new Scanner(System.in);
        int answer2=(int)(Math.random()*1000+1);
        int guess2;
        do{
            System.out.println("请输入你猜的值");
            guess2=scan3.nextInt();
            if(guess2<answer2){
                System.out.println("猜小了");
            }else if(guess2>answer2){
                System.out.println("猜大了");
            }else{
                System.out.println("恭喜你，猜对了！");
            }
        }while (guess2!=answer2);

        System.out.println("第四题");
        for(int num=0;num<5;num++){
            System.out.println("行动是成功的阶梯");
        }

        for(int num=1;num<10;num++){
            System.out.println(num+"*9="+num*9);
        }
        for(int num=1;num<10;num+=2){
            System.out.println(num+"*9="+num*9);
        }
        for(int num=9;num>0;num--){
            System.out.println(num+"*9="+num*9);



        }
    }
}
